package edu.hawaii.halealohacli.command;

import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.wattdepot.client.WattDepotClient;

/**
 * Tests for the CurrentPower.
 * 
 * @author Chris Wilson
 */
public class TestCurrentPower {

  /**
   * Test for CurrentPower.
   */
  @Test
  public void currentPowerTest() {
    CurrentPower cp = new CurrentPower();
    String[] arg = { "current-power", "Lokelani" };
    WattDepotClient cl = new WattDepotClient("http://server.wattdepot.org:8190/wattdepot/");
    if (cp.initializeCommand(cl, arg) && cp.initializeData(arg[1])) {
      assertTrue("Current Power reading is greater than 0", cp.getPwrReading() > 0.0);
    }
  }

}
